package com.docking.heylo.dao.mapper;

import com.docking.heylo.dao.entity.Post;
import com.docking.heylo.dao.entity.PostExample;
import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

public interface PostMapper {
    long countByExample(PostExample example);

    int deleteByExample(PostExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Post record);

    int insertSelective(Post record);

    List<Post> selectByExampleWithBLOBs(PostExample example);

    List<Post> selectByExample(PostExample example);

    Post selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Post record, @Param("example") PostExample example);

    int updateByExampleWithBLOBs(@Param("record") Post record, @Param("example") PostExample example);

    int updateByExample(@Param("record") Post record, @Param("example") PostExample example);

    int updateByPrimaryKeySelective(Post record);

    int updateByPrimaryKeyWithBLOBs(Post record);

    int updateByPrimaryKey(Post record);

    void submitComment(@Param("postId") Integer postId);

    Post selectLastPostForUser(Integer userId);


    List<Map<String, Object>> selectPostByUserId(@Param("userId") int userId, @Param("state") Integer state);

    List<Map<String, Object>> selectMyBuddyPost(@Param("userId") int userId);

    Map<String, Object> panel(@Param("id") Integer id);

    void like(@Param("id") Integer id);

    void cancelLike(@Param("id") Integer id);

    List<Map<String, Object>> managers(@Param("userPhone") String userPhone, @Param("userId") Integer userId);



}